<%
'GET FORM VALUES
	entryID = Request("ID")
	
'CONNECT TO DATABASE

	dbPath = "db/contacts.mdb"

	Set conn = Server.CreateObject("ADODB.Connection")
	MdbFilePath = Server.MapPath(dbPath)
	conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"

'INSERT DATA INTO DATABASE
	SQL_stmt = "DELETE FROM People WHERE PersonNo=" & entryID
	set RS = conn.execute(SQL_stmt)

'CLOSE DATABASE CONNECTION
	conn.close
	set conn = nothing
	set sqlstmt = nothing

'REDIRECT TO FULL LISTING
	'newPage = "index.asp"
	'Response.Redirect (newPage)
	
	newPage = "delete_contact_success.asp"
	Response.Redirect (newPage)
%>